package com.ruoyi.backend.mapper;

import com.ruoyi.backend.dto.SatelliteDTO;
import com.ruoyi.backend.pojo.Satellite;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.time.LocalDate;
import java.util.List;

@Mapper
@Component("BackendSatelliteMapper")
public interface SatelliteMapper {



    List<Satellite> findBySatelliteIdPrefix(String prefix);

    void upload(SatelliteDTO satelliteDTO);

    void update(Satellite satelliteDTO);

    List<Satellite> search(@Param("mineId") String mineId,
                           @Param("productType") String productType,
                           @Param("dataSource") String dataSource,
                           @Param("productName") String productName,
                           @Param("satelliteType") String satelliteType,
                           @Param("startTime") LocalDate startTime,
                           @Param("endTime") LocalDate endTime,
                           @Param("productLevel") String productLevel);

    void delete(String id);

    Integer getCountSatelliteId(String satelliteId);

    Satellite findById(String id);

    Satellite searchSatelliteData(String mineId, LocalDate dataTime, String spatialCoverage);


}
